﻿#ifndef APPLICATION1_H
#define APPLICATION1_H

#include <QtWidgets/QMainWindow>
#include "ui_Application1.h"
#include <QtWidgets/QWidget>
#include <string>
#include <vector>
#include <QMap>
#include <QProcessEnvironment>
#include "lifemanagewindow.h"
#include "LoadManager.h"
using namespace std;

class Application1 : public QWidget
{
	Q_OBJECT

public:
	Application1(QWidget *parent = 0);
	~Application1();

public:
	void Start();
	void Setup();//new服务构件信息和界面插件信息
private:
	Ui::Application1Class ui;
	Logger* logger;//日志记录器
	vector<SerLoad> vecSerLoad;//存储要加载服务构件的信息
	vector<ViewLoad> vecViewLoad;//存储要加载的界面插件信息
	LifeManageWindow mLifeManageDlg;//生命周期管理窗体
	QMap<QString,bool> mFlags;//每一个组件实例是否加载，键是实例名
	QMap<QString,ILoadManager*> mILoadManagerMap;//键是dll文件名（不带.dll扩展名）
private:
	void loadSerDll();
	void loadViewDll(QWidget* parent);
	void readXml();
};


#endif
